package java_thinking.unit_20;

import java.lang.annotation.*;

/**
 * @Desc:   接着，创建注解本身，然后标记@Repeatable
 *          如果我们尝试去掉@Repeatable 我们会得到编译器的错误信息：Duplicate annotation of non-repeatable type
 * @author: cww
 * @DateTime: 2019-05-27 23:41
 */
@Retention( RetentionPolicy.RUNTIME )
@Target( ElementType.TYPE_USE )
@Repeatable( RepeatedValues.class )
public @interface CanBeRepeated {
    String value();
}
/**
 *
 我们可以这样重复地使用：
 */
@CanBeRepeated( "the color is green" )
@CanBeRepeated( "the color is red" )
@CanBeRepeated( "the color is blue" )
class RepeatableAnnotated
{

}
